package ooday05;
/** 枚举的演示 */
public class EnumDemo {
    public static void main(String[] args) {
        Season[] seasons = Season.values();
        for (int i=0;i<seasons.length;i++){
            System.out.println(seasons[i]);
            System.out.println(seasons[i].getSeasonName());
            System.out.println(seasons[i].getSeasonDesc());
        }

        Season s = Season.WINTER;
        System.out.println(s.getSeasonName());

        switch (s){
            case SPRING:
                System.out.println("天气"+s.getSeasonDesc()+",放风筝...");
                break;
            case SUMMER:
                System.out.println("天气"+s.getSeasonDesc()+"去游泳...");
                break;
            case AUTUMN:
                System.out.println("天气"+s.getSeasonDesc()+"去野炊...");
                break;
            case WINTER:
                System.out.println("天气"+s.getSeasonDesc()+"去打雪仗...");
                break;
        }








        /*
        Season s1 = Season.SPRING;
        System.out.println(s1.getSeasonName()+","+s1.getSeasonDesc());
        Season s2 = Season.SUMMER;
        System.out.println(s2.getSeasonName()+","+s2.getSeasonDesc());
        Season s3 = Season.AUTUMN;
        System.out.println(s3.getSeasonName()+","+s3.getSeasonDesc());
        Season s4 = Season.WINTER;
        System.out.println(s4.getSeasonName()+","+s4.getSeasonDesc());
         */
    }
}
